package com.eclink.iot.tcp.virtualdevice.util;


import com.eclink.iot.tcp.virtualdevice.message.MessageFactory;
import io.vertx.core.net.NetSocket;

import java.util.List;

public class SocketUtil {

    public static void ping(NetSocket socket, String uuid) {
        List<Byte> message = MessageFactory.generatePingMessage(uuid);
        socket.write(BufferUtil.transListToBuffer(message));
    }

    public static void sendRfid(NetSocket socket, String uuid, String tag) {
        List<Byte> message = MessageFactory.generateRfidMessage(uuid, tag);
        socket.write(BufferUtil.transListToBuffer(message));
    }

    public static void upgrade(NetSocket socket, String uuid) {
//        List<Byte> message = MessageFactory.generateRfidMessage(uuid);
//        socket.write(BufferUtil.transListToBuffer(message));
    }
}
